#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn=1e5+20;
int n,a[maxn];
void quick_sort(int a[],int left,int right) {
	 if (left >= right)return;
    int p = left, i = left, j = right;
    while (i < j) {
        while (j > i && j >= left && a[j] >= a[p])j--;
        while (j > i && i <= right && a[i] <= a[p])i++;
        if (i >= j)break;
        swap(a[i], a[j]);
    }
    swap(a[left], a[i]);
    p = i;
    quick_sort(a, left, p - 1);
    quick_sort(a, p + 1, right);
}

int main() {
	cin>>n;
	for(int i=0; i<n; i++)cin>>a[i];
	quick_sort(a,0,n-1);
	for(int i=0; i<n; i++)
		cout<<a[i]<<" ";

	return 0;
}

